<template>
  <PageWrapper>
    <BasicTable class="page-search-table" @register="registerTable" />
  </PageWrapper>
</template>
<script lang="ts">
  import { defineComponent, onMounted } from 'vue';
  import { BasicTable, useTable } from '/@/components/Table';
  import { PageWrapper } from '/@/components/Page';
  import { tableConfig } from './tableData';

  import moment from 'moment';
  import utils from '/@/utils/utils.js';
  export default defineComponent({
    name: 'LogIndex',
    components: { PageWrapper, BasicTable },
    setup() {
      const [registerTable, { getForm }] = useTable(tableConfig);
      onMounted(() => {
        getForm().setFieldsValue({
          time: [
            moment(utils.getCurrentTime()).format('YYYY/MM/DD HH:mm:ss'),
            moment(utils.getCurrentTime()).format('YYYY/MM/DD') + ' 23:59:59',
          ],
        });
      });
      return {
        registerTable,
      };
    },
  });
</script>
